package com.hfut.wxy.controller;

import com.hfut.wxy.common.response.Response;
import com.hfut.wxy.common.response.WxyPage;
import com.hfut.wxy.service.IChatService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import static com.hfut.wxy.common.response.Response.success;

/**
 * @Author: RyouA
 * @Date: 2020/4/25 - 9:24 下午
 **/
@Api(tags = "聊天记录相关接口")
@RestController
public class ChatController {
    @Autowired
    private IChatService chatService;

    @GetMapping("/allChat/{orderId}")
    public Response getAllChat(@PathVariable Integer orderId, WxyPage page) {
        return success(chatService.getAllChatByOrderId(orderId,page));
    }
}
